/**
 * 
 */
package bot;

/**
 * @author Philip
 *
 */
public class SettingsLoader extends FileLoader {
	private String server;
	private int port;
	private String nickName;
	private String fullName;
	private String authName;
	private String autoJoinChannels;

	public SettingsLoader(String fileName) {
		super(fileName);
	}

	@Override
	public void load() {
		server = scan.nextLine();
		port = Integer.parseInt(scan.nextLine());

		nickName = scan.nextLine();
		fullName = scan.nextLine();
		authName = null;
		StringBuilder startChannels = new StringBuilder();

		while (scan.hasNext()) {
			startChannels.append(scan.next()).append(" ");
		}
		
		autoJoinChannels = startChannels.toString();

		scan.close();
	}

	public String getServer() {
		return server;
	}

	public int getPort() {
		return port;
	}

	public String getNickName() {
		return nickName;
	}

	public String getFullName() {
		return fullName;
	}
	
	public String getAuthName() {
		return authName;
	}

	public String getAutoJoinChannels() {
		return autoJoinChannels;
	}
}
